package com.heo.service.impl;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.heo.dao.BaseMapper;
import com.heo.dao.DeviceModelMapper;
import com.heo.pojo.DeviceModelEntity;
import com.heo.service.DeviceModelService;

@Service("deviceModelService")
public class DeviceModelServiceImpl extends BaseServiceImpl<DeviceModelEntity> implements DeviceModelService {
	@Resource
	private DeviceModelMapper deviceModelMapper;

	@Override
	protected BaseMapper<DeviceModelEntity> getDao() {
		return deviceModelMapper;
	}

	@Override
	public DeviceModelEntity getDeviceModelMap(Integer deviceModelId) {
		return getDao().getByKey(deviceModelId, "selectByPrimaryKey");
	}
	
	@Override
	public DeviceModelEntity getDeviceModelMapByImei(String deviceImei) {
		return getDao().getByKey(deviceImei, "getByDeviceIMEI");
	}
	
}
